package com.yingxue.lesson.service;

import com.yingxue.lesson.entity.SysFile;
import com.yingxue.lesson.vo.req.fileVo.FilePageReqVO;
import com.yingxue.lesson.vo.resp.PageVO;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

public interface FileService {

    //文件上传
    String upload(MultipartFile file,String userId,Integer type);
    //文件下载
    void download(String fileId, HttpServletResponse response);

    // 根据 fileUrl 删除文件
    int deleteByFileUrl(String fileUrl);

    //分页查询所有文件
    PageVO<SysFile> pageInfo(FilePageReqVO vo, String userId);

}
